<template>
  <div>
    <div class="loading-container" v-show="loadingStore.loadingFlag">
      <van-loading type="spinner" />
    </div>
    <van-nav-bar title="软件1804交作业用" />
    <div style="margin: 10px">
      <router-view></router-view>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from "vue";
import { useLoading } from "@/store/useLoading";
export default defineComponent({
  name: "App",
  // 注册你的组件
  components: {},
  props: {},
  setup(props) {
    let loadingStore = useLoading();
    return {
      loadingStore,
    };
  },
});
</script>

<style>
#app {
  height: 100vh;
  background: #f3f4f5;
}
.loading-container {
  position: fixed;
  z-index: 9999;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>
